Skip to content

chore: add standard-version and release script - #68

Merged
fabiojose merged 1 commit into
cloudevents:masterfrom
lance:56-add-standard-version
Apr 29, 2020
Merged

fabiojose merged 1 commit into
cloudevents:masterfrom
lance:56-add-standard-version

Conversation

@lance

@lance lance commented Apr 27, 2020

Copy link
Copy Markdown
Member

This commit adds the standard-version module for managing releases.
When running npm run release the following steps are taken.

  1. Retreive the current version of your repository by looking at package.json.
  2. Bump the version in package.json based on the commits.
  3. Prepends to the CHANGELOG based on the commits (uses conventional-changelog under the hood).
  4. Create a new commit including the package.json and updated CHANGELOG.
  5. Create a new tag with the new version number.

This works best if all commits follow the Conventional Commits specification.
https://www.conventionalcommits.org/en/v1.0.0/

Fixes: #56

@lance
lance force-pushed the 56-add-standard-version branch from d1c6995 to f140aa8 Compare April 27, 2020 20:40
@grant

grant commented Apr 28, 2020

Copy link
Copy Markdown
Member

Looks good to me besides the conflicts.

@fabiojose

Copy link
Copy Markdown
Contributor

@lance could you fix the conflicts and remove the package-lock.json?

@lance
lance force-pushed the 56-add-standard-version branch from f140aa8 to 815865d Compare April 28, 2020 19:36
@lance

lance commented Apr 28, 2020

Copy link
Copy Markdown
Member Author

@fabiojose conflicts have been resolved.

I suggest keeping package-lock.json. It was intentionally added by me in aa2cef6. Standard best practices (and npm documentation recommend keeping these in your source repositories.

@grant

grant commented Apr 28, 2020

Copy link
Copy Markdown
Member

Looks mergeable to me. Please keep the lock as is standard practice. 👍
Will wait for Fabio's response.

@lance

lance commented Apr 28, 2020

Copy link
Copy Markdown
Member Author

@fabiojose do you think it would be possible to avoid doing a Merge commit on these, but instead do a Squash and Merge or Squash and Rebase? When performing merge commits, we get commits in the commit log that look like this:

Merge pull request #55 from lance/54-add-linter …

A squash and merge will make it so that the commit log is cleaner, with only messages like this:

src: add eslint configuration and npm script …

For standard-version to automatically format and document the changelog, it's best if all commits in the commit log follow the Conventional Commits spec. thanks!

@fabiojose

Copy link
Copy Markdown
Contributor

Yes, off course!

@grant

grant commented Apr 28, 2020

Copy link
Copy Markdown
Member

@fabiojose do you think it would be possible to avoid doing a Merge commit on these, but instead do a Squash and Merge or Squash and Rebase? When performing merge commits, we get commits in the commit log that look like this:

Merge pull request #55 from lance/54-add-linter …

A squash and merge will make it so that the commit log is cleaner, with only messages like this:

src: add eslint configuration and npm script …

For standard-version to automatically format and document the changelog, it's best if all commits in the commit log follow the Conventional Commits spec. thanks!

I've disabled merge commits and only allowed squash/rebase.

@fabiojose

Copy link
Copy Markdown
Contributor

@lance could you update the section Changelog at https://github.com/cloudevents/sdk-javascript/blob/master/CONTRIBUTING.md?

Please add links or tips for incoming contributors.

@lance
lance force-pushed the 56-add-standard-version branch from 815865d to 396e4b0 Compare April 28, 2020 21:45
@lance
lance force-pushed the 56-add-standard-version branch from 396e4b0 to 042db05 Compare April 28, 2020 22:15
This commit adds the `standard-version` module for managing releases.
When running `npm run release` the following steps are taken.

1. Retreive the current version of your repository by looking at package.json.
2. Bump the version in package.json based on the commits.
3. Prepends to the CHANGELOG based on the commits (uses conventional-changelog under the hood).
4. Create a new commit including the package.json and updated CHANGELOG.
5. Create a new tag with the new version number.

This works best if all commits follow the Conventional Commits specification.
https://www.conventionalcommits.org/en/v1.0.0/

Fixes: cloudevents#56

Signed-off-by: Lance Ball <lball@redhat.com>
@lance
lance force-pushed the 56-add-standard-version branch from 042db05 to ff40b23 Compare April 28, 2020 23:52
@fabiojose
fabiojose merged commit f47bca4 into cloudevents:master Apr 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Recommend using standard-version for versioning and changelog

3 participants